package com.xinxi11.project.qx.user.impl;

import java.util.List;

import com.google.common.collect.Lists;
import com.xinxi11.project.qx.user.ILoginUserInfo;

public class LoginUserInfo implements ILoginUserInfo {

	private static final long serialVersionUID = 8437526944913442267L;
	private Long id;
	private String userName;
	private Boolean isAdmin = false;
	private Boolean isManager = false;
	private List<String> roles = Lists.newArrayList();
	private String models;
	private String modelMenuTree;
	private String stringUnitInfo;

	@Override
	public String getModels() {
		return this.models;
	}

	@Override
	public String getUserName() {
		return this.userName;
	}

	@Override
	public Long getId() {
		return this.id;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public void setId(Long userId) {
		this.id = userId;
	}

	public void setModels(String models) {
		this.models = models;
	}

	@Override
	public List<String> getRoles() {
		return roles;
	}

	public void setRoles(List<String> roles) {
		this.roles = roles;
	}

	@Override
	public String getModelMenuTree() {
		return this.modelMenuTree;
	}

	public void setModelMenuTree(String modelMenuTree) {
		this.modelMenuTree = modelMenuTree;
	}

	@Override
	public Boolean getIsAdmin() {
		return isAdmin;
	}

	public void setIsAdmin(Boolean isAdmin) {
		this.isAdmin = isAdmin;
	}

	@Override
	public Boolean getIsManager() {
		return isManager;
	}

	public void setIsManager(Boolean isManager) {
		this.isManager = isManager;
	}

	@Override
	public Boolean getIsEmployee() {
		// 非管理员组,非部门主管用户
		return !(isAdmin || isManager);
	}

	public String getStringUnitInfo() {
		return stringUnitInfo;
	}

	public void setStringUnitInfo(String stringUnitInfo) {
		this.stringUnitInfo = stringUnitInfo;
	}

}
